﻿@model NerdDinnerMVC.NerdDinnerService.PaginatedDinnerResultList
@{
    ViewBag.Title = "Upcoming Dinners";
}
<h2>Upcoming Dinners</h2>
<ul>
    @foreach (var dinner in Model.Result)
    {
     
        
        <li> @Html.ActionLink(@dinner.Title, "Details", new {id = @dinner.DinnerId}) on @dinner.EventDate.ToShortDateString()
            @@ @dinner.EventDate.ToShortTimeString() </li>
        
    }
</ul>
@if (Model.HasPreviousPage) 
        { 
            @Html.RouteLink("<<<", "UpcomingDinners", new {page= (Model.PageIndex - 1)}) ;
        } 
          <em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</em>
@if (Model.HasNextPage) 
        {
            @Html.RouteLink(">>>", "UpcomingDinners", new { page = (Model.PageIndex + 1) });
        } 

